package com.zrf.gulimall.cart.feign;

import com.zrf.gulimall.cart.vo.SkuInfoVo;
import com.zrf.gulimall.commnon.core.response.Resp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author zhanrf
 * @Date 2022/1/3 16:15
 */
@FeignClient("service-product")
public interface ProductFeignService {

	/**
	 * 远程调用获取商品信息
	 * @param skuId 商品id
	 * @return
	 */
	@GetMapping("/product/skuinfo/api/info/{skuId}")
	Resp<SkuInfoVo> getSkuInfo(@PathVariable("skuId") Long skuId);

	/**
	 * 远程调用获取商品属性
	 * @param skuId 商品id
	 * @return
	 */
	@GetMapping("/product/skusaleattrvalue/stringList/{skuId}")
	List<String> getSkuSaleAttrValues(@PathVariable("skuId") Long skuId);

	@PostMapping("/product/skuinfo/api/info/list")
	Resp<List<SkuInfoVo>> getSkuInfoByIds(@RequestBody List<Long> skuIdList);
}
